"""
@Project:p8project
@File:user_all.py
@Author:袁浩天
@Date:16:06
"""
from flask import Blueprint, jsonify, Response
from flask_restful import Api, Resource, reqparse
from werkzeug.security import generate_password_hash
from common.models.users import *
from celery_task.tasks.sms import *
import random, redis, string
from sqlalchemy import or_
from common.models import db

from common.utils.login_token import _generate_token

user_all_bp = Blueprint('user_all', __name__)

api = Api(user_all_bp)


#　学过的课程
class UserLeanGet(Resource):
    def get(self):
        parser = reqparse.RequestParser()
        parser.add_argument("cid")
        args = parser.parse_args()
        cid = args.get("cid")

        print("cid的验证》》》》》》》》》》》》》》》》》》", cid)
        if cid == None:
            return jsonify(message="没有传递数据", code=204)

        return jsonify(message="有数据", code=200, data="1")



# 学过的课程路由
api.add_resource(UserLeanGet, "/learninfo")












